<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <title>Title</title>
    <style>
        .pg-header{
            height: 48px;
            background-color: black;
            color: #dddddd;
            position: fixed;
            top:0;
            right:0;
            left: 0;
        }
        .pg-body{
            background-color: #dddddd;
            height: 2000px;
            margin-top: 50px;   /* 使得头部div不覆盖内容的div*/
        }
    </style>

</head>
<body>

    <div class="pg-header">头部</div>
    <div class="pg-body">内容</div>

</body>
</html>